if "%1"=="Debug" goto debug

xcopy %QT_DIR%\bin\Qt5Core.dll .\bin\Release\ /Q /Y /D
xcopy %QT_DIR%\bin\Qt5Gui.dll .\bin\Release\ /Q /Y /D
xcopy %QT_DIR%\bin\Qt5Network.dll .\bin\Release\ /Q /Y /D
xcopy %QT_DIR%\bin\Qt5Sql.dll .\bin\Release\ /Q /Y /D
xcopy %QT_DIR%\bin\Qt5Test.dll .\bin\Release\ /Q /Y /D
xcopy %QT_DIR%\bin\Qt5Widgets.dll .\bin\Release\ /Q /Y /D
xcopy %QT_DIR%\bin\Qt5Xml.dll .\bin\Release\ /Q /Y /D

if not exist .\bin\Release\test mkdir .\bin\Release\test
if not exist .\bin\Release\platforms mkdir .\bin\Release\platforms
if not exist .\bin\Release\plugins mkdir .\bin\Release\plugins
if not exist .\bin\Release\plugins\sqldrivers mkdir .\bin\Release\plugins\sqldrivers

xcopy %QT_DIR%\plugins\platforms\qminimal.dll .\bin\Release\platforms\ /Q /Y /D
xcopy %QT_DIR%\plugins\platforms\qwindows.dll .\bin\Release\platforms\ /Q /Y /D

xcopy %QT_DIR%\plugins\sqldrivers\qsqlmysql.dll .\bin\Release\plugins\sqldrivers\ /Q /Y /D
xcopy %QT_DIR%\plugins\sqldrivers\qsqlodbc.dll .\bin\Release\plugins\sqldrivers\ /Q /Y /D
xcopy %QT_DIR%\plugins\sqldrivers\qsqlpsql.dll .\bin\Release\plugins\sqldrivers\ /Q /Y /D

xcopy %MYSQL_DIR%\lib\libmysql.dll .\bin\Release\ /Q /Y /D
xcopy %MYSQL_DIR%\lib\libmysqld.dll .\bin\Release\ /Q /Y /D

goto end

:debug

xcopy %QT_DIR%\bin\Qt5Cored.dll .\bin\Debug\ /Q /Y /D
xcopy %QT_DIR%\lib\Qt5Cored.pdb .\bin\Debug\ /Q /Y /D
xcopy %QT_DIR%\bin\Qt5Guid.dll .\bin\Debug\ /Q /Y /D
xcopy %QT_DIR%\lib\Qt5Guid.pdb .\bin\Debug\ /Q /Y /D
xcopy %QT_DIR%\bin\Qt5Networkd.dll .\bin\Debug\ /Q /Y /D
xcopy %QT_DIR%\lib\Qt5Networkd.pdb .\bin\Debug\ /Q /Y /D
xcopy %QT_DIR%\bin\Qt5Sqld.dll .\bin\Debug\ /Q /Y /D
xcopy %QT_DIR%\lib\Qt5Sqld.pdb .\bin\Debug\ /Q /Y /D
xcopy %QT_DIR%\bin\Qt5Testd.dll .\bin\Debug\ /Q /Y /D
xcopy %QT_DIR%\lib\Qt5Testd.pdb .\bin\Debug\ /Q /Y /D
xcopy %QT_DIR%\bin\Qt5Widgetsd.dll .\bin\Debug\ /Q /Y /D
xcopy %QT_DIR%\lib\Qt5Widgetsd.pdb .\bin\Debug\ /Q /Y /D
xcopy %QT_DIR%\bin\Qt5Xmld.dll .\bin\Debug\ /Q /Y /D
xcopy %QT_DIR%\lib\Qt5Xmld.pdb .\bin\Debug\ /Q /Y /D

if not exist .\bin\Debug\test mkdir .\bin\Debug\test
if not exist .\bin\Debug\platforms mkdir .\bin\Debug\platforms
if not exist .\bin\Debug\plugins mkdir .\bin\Debug\plugins
if not exist .\bin\Debug\plugins\sqldrivers mkdir .\bin\Debug\plugins\sqldrivers

xcopy %QT_DIR%\plugins\platforms\qminimald.dll .\bin\Debug\platforms\ /Q /Y /D
xcopy %QT_DIR%\plugins\platforms\qwindowsd.dll .\bin\Debug\platforms\ /Q /Y /D

xcopy %QT_DIR%\plugins\sqldrivers\qsqlmysqld.dll .\bin\Debug\plugins\sqldrivers\ /Q /Y /D
xcopy %QT_DIR%\plugins\sqldrivers\qsqlodbcd.dll .\bin\Debug\plugins\sqldrivers\ /Q /Y /D
xcopy %QT_DIR%\plugins\sqldrivers\qsqlpsqld.dll .\bin\Debug\plugins\sqldrivers\ /Q /Y /D

xcopy %MYSQL_DIR%\lib\libmysql.dll .\bin\Debug\ /Q /Y /D
xcopy %MYSQL_DIR%\lib\libmysqld.dll .\bin\Debug\ /Q /Y /D

:end
